<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('Redis监控')" />
</head>
<body class="gray-bg">

	<div class="row  border-bottom white-bg dashboard-header">
        <div class="col-sm-12">
            <p>奥迪Redis监控</p>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">

        <div class="row">
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">Redis版本</h5>
                        <h2 class="text-navy">
                            [[${redis.redis_version}]]
                        </h2>
                        <small>更新时间：[[${redis.redis_version_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">Redis 使用内存(包含虚拟内存)</h5>
                        <h2 class="text-navy">
                             [[${redis.used_memory_human}]]
                        </h2>
                        <small>更新时间：[[${redis.used_memory_human_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">Redis 进程使用内存</h5>
                        <h2 class="text-navy">
                            [[${redis.used_memory_rss_human}]]
                        </h2>
                        <small>更新时间：[[${redis.used_memory_rss_human_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">Redis 内存使用峰值</h5>
                        <h2 class="text-navy">
                            [[${redis.used_memory_peak_human}]]
                        </h2>
                        <small>更新时间：[[${redis.used_memory_peak_human_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">系统可用内存</h5>
                        <h2 class="text-navy">
                            [[${redis.total_system_memory_human}]]
                        </h2>
                        <small>更新时间：[[${redis.total_system_memory_human_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">Redis Key 总数</h5>
                        <h2 class="text-navy">
                            [[${redis.totalKeyNum}]]
                        </h2>
                        <small>更新时间：[[${redis.totalKeyNum_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">客户端连接数</h5>
                        <h2 class="text-navy">
                            [[${redis.connected_clients}]]
                        </h2>
                        <small>更新时间：[[${redis.connected_clients_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">运行天数</h5>
                        <h2 class="text-navy">
                            [[${redis.uptime_in_days}]]
                        </h2>
                        <small>更新时间：[[${redis.uptime_in_days_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">内存分配器</h5>
                        <h2 class="text-navy">
                            [[${redis.mem_allocator}]]
                        </h2>
                        <small>更新时间：[[${redis.mem_allocator_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">查询命中数量</h5>
                        <h2 class="text-navy">
                            [[${redis.keyspace_hits}]]
                        </h2>
                        <small>更新时间：[[${redis.keyspace_hits_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">查询未命中数</h5>
                        <h2 class="text-navy">
                            [[${redis.keyspace_misses}]]
                        </h2>
                        <small>更新时间：[[${redis.keyspace_misses_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">已过期Key数量</h5>
                        <h2 class="text-navy">
                            [[${redis.expired_keys}]]
                        </h2>
                        <small>更新时间：[[${redis.expired_keys_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">由于 maxmemory 限制，而被回收内存的 key 的总数</h5>
                        <h2 class="text-navy">
                            [[${redis.evicted_keys}]]
                        </h2>
                        <small>更新时间：[[${redis.evicted_keys_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">最后一次持久化保存磁盘的时间戳</h5>
                        <h2 class="text-navy">
                            [[${redis.rdb_last_save_time}]]
                        </h2>
                        <small>更新时间：[[${redis.rdb_last_save_time_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">自最后一次持久化以来数据库的更改数</h5>
                        <h2 class="text-navy">
                            [[${redis.rdb_changes_since_last_save}]]
                        </h2>
                        <small>更新时间：[[${redis.rdb_changes_since_last_save_time}]]</small>
                    </div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5 class="m-b-md">拒绝连接数</h5>
                        <h2 class="text-navy">
                            [[${redis.rejected_connections}]]
                        </h2>
                        <small>[[${redis.rejected_connections_time}]]</small>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-12  table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: echarts-js" />

    <script th:inline="javascript">
        var prefix = ctx + "business/redis";

        $(function() {
            var options = {
                uniqueId: "rkey",
                url: prefix + "/list",
                sortName: "rkey",
                sortOrder: "desc",
                showExport: true,
                escape: true,
                pageSize: 500,
                columns: [
                    {
                        field: 'rkey',
                        title: '监控指标',
                        sortable: true
                    },
                    {
                        field: 'rvalue',
                        title: '值'
                    },
                    {
                        field: 'updateTime',
                        title: '更新时间',
                        sortable: true
                    }]
            };
            $.table.init(options);
        });




    </script>
</body>
</html>